package com.store.orm.mysql.handler;

import java.sql.Timestamp;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author 宫静雨
 * @version 1.0
 */
public final class ConvertTypeHandler {

    public static final Map<Class<?>, String> PT =
            new HashMap<Class<?>, String>() {{
                put(Integer.class, "INT");
                put(Long.class, "BIGINT");
                put(Float.class, "FLOAT");
                put(Double.class, "DOUBLE");
                put(String.class, "VARCHAR(255)");
                put(Date.class, "DATE");
                put(Timestamp.class, "TIMESTAMP");
            }};

    public static final Map<String, Class<?>> TP =
            new HashMap<String, Class<?>>() {{
                put("INT", Integer.class);
                put("BIGINT", Long.class);
                put("FLOAT", Float.class);
                put("DOUBLE", Double.class);
                put("VARCHAR", String.class);
                put("CHAR", String.class);
                put("DATE", Date.class);
                put("TIMESTAMP", Timestamp.class);
            }};
}